﻿using ClusterAwareAdmin;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ClusterAwareAdminTest
{
    
    
    /// <summary>
    ///This is a test class for ResourceTypeAdminTest and is intended
    ///to contain all ResourceTypeAdminTest Unit Tests
    ///</summary>
    [TestClass]
    public class ResourceTypeAdminTest
    {
        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext { get; set; }

        private static ClusterManagerAdmin _manager;

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        [ClassInitialize]
        public static void ClassTestInitialize(TestContext testContext)
        {
        }
        //
        //Use ClassCleanup to run code after all tests in a class have run
        [ClassCleanup]
        public static void ClassTestCleanup()
        {
        }
        //
        //Use TestInitialize to run code before running each test
        [TestInitialize]
        public void Initialize()
        {
            _manager = new ClusterManagerAdmin
            {
                Username = SharedConsts.User,
                Password = SharedConsts.Pwd,
                Domain = SharedConsts.Domain,
                Machine = SharedConsts.Machine,
                CacheInstances = false
            };
            _manager.Connect();
        }
        //
        //Use TestCleanup to run code after each test has run
        [TestCleanup]
        public void Cleanup()
        {
            _manager.Dispose();
        }

        #endregion

        /// <summary>
        ///A test for Delete
        ///</summary>
        [TestMethod]
        public void DeleteTest()
        {
            //var target = new ResourceTypeAdmin(_manager); 
            //target.Delete(<put ResourceTypeAdmin name>);
            //var actual = target.ExistResourceTyepe(<put ResourceTypeAdmin name>);
            //Assert.AreEqual(false,actual);
            Assert.Inconclusive("Put name Resource Type to test Delete");
        }

        /// <summary>
        ///A test for Create
        ///</summary>
        [TestMethod]
        public void CreateTest()
        {
            //var target = new ResourceTypeAdmin(_manager); 
            //target.Create(resourcetypeName, displayname, dllname, looksAlivePollInterval, isAlivePollInterval);
            Assert.Inconclusive("Put name ResourceType and other parameters to test Create");
        }

        /// <summary>
        ///A test for ResourceTypeAdmin Constructor
        ///</summary>
        [TestMethod]
        public void ResourceTypeAdminConstructorTest()
        {
           new ResourceTypeAdmin(_manager);
        }
    }
}
